package com.ag.zrt.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.ag.common.BaseAction;
import com.ag.zrt.service.TypeService;
import com.ag.bean.TbType;
@Controller("findTypeAction")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class FindTypeAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4266878474688351534L;
	@Resource(name="TypeService")
	private TypeService typeService;
	private List<TbType> typeList;

	public List<TbType> getTypeList() {
		return typeList;
	}

	public void setTypeService(TypeService typeService) {
		this.typeService = typeService;
	}

	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		typeList = typeService.findAll();
		return "find_type_succ";
	}

}
